<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>预约借款状态</title>
    <link rel="stylesheet" href="/Public/css/gxxj/public_O.css">
    <link href="/Public/css/animate.css" rel="stylesheet">
    <style type="text/css">
        html{
            background: #fff; 
            height: 100%;
        }
    </style>
</head>
<body style="padding:10px;">
<div>
    <table class="search_table animated fadeInRight" style="width: 100%">
        <tr>
            <th>类型</th>
            <th >金额</th>
            <!--<th>回答客服</th>-->
            <th>订单创建时间</th>
            <th>预约打款时间</th>
            <th>
                <span style="display: inline-block; position: relative;">
                    状态
                </span>

            </th>
            <th>操作</th>
        </tr>
        <volist name="data" id="vo">

        <tr>
            <td><{$vo.days}></td>
            <td><{$vo.money}></td>
            <td><{$vo.ctime}></td>
            <td><{$vo.play_time}></td>
            <td><{$vo.status}></td>
            <if condition="($vo.status_s eq '1')">
                <td>
                    <span class="bg_color_green color_white table_span" style="font-size: small " onclick="cancel_apt('<{$vo.id}>')">取消预约</span>
                </td>
                <else/>
                <td >
                    <span class="bg_color_green color_white table_span" style="font-size: small; background-color: #7F7F7F ">取消预约</span>
                </td>
            </if>
        </tr>
        </volist>
    </table>
</div>


<script type="text/javascript" src="/Public/js/jquery.min.js"></script>
<script src="/Public/js/layer/layer.js"></script>
<script src="/Public/js/layui/layui.js"></script>
<script>

    function cancel_apt(id) {
        var url= "<{$SERVER_NAME}>/User/cancel_apt";
        var index = layer.load(1, {
            shade: [0.1, '#fff'] //0.1透明度的白色背景
        });
        $.post(url, {id: id}, function (data) {
            console.log('11111111',data);
            console.log('22222',id);
            if (data.code == "1001") {
                layer.alert(data.result, {title: '提示框', icon: 1}, function (index) {

                    layer.close(index);
                });
            }
            else {
                layer.alert(data.result, {title: '提示框', icon: 2});
                layer.close(index);
            }
        });
        layer.close(index);



    }
</script>


</body>
</html>